package god530.com.simpleapp_slide.database;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import god530.com.simpleapp_slide.R;

/**
 * Created by Administrator on 2016/12/21.
 */

public class DBSubsUtils {

    public static final String INCOME = "INCOME";
    public static final String OUTCOMe = "OUTCOME";

    DBHelper helper;

    public static final void inistSubsData(Context ctx, SQLiteDatabase db) {
        String tally_type_income = ctx.getString(R.string.tally_type_income);
        String tally_type_outcome = ctx.getString(R.string.tally_type_outcome);

        ContentValues valuseIncome = new ContentValues();
        valuseIncome.put(DBContants.SUBS.NUMBER, INCOME);
        valuseIncome.put(DBContants.SUBS.SUBS, tally_type_income);
        db.insert(DBContants.SUBS.TABLE, null, valuseIncome);

        ContentValues valuseOutCome = new ContentValues();
        valuseOutCome.put(DBContants.SUBS.NUMBER, INCOME);
        valuseOutCome.put(DBContants.SUBS.SUBS, tally_type_income);
        db.insert(DBContants.SUBS.TABLE, null, valuseOutCome);
    }

}
